1 Introduction

This R Markdown file delves into analyzing ransomware infections using data extracted from the Shodan API. By analyzing real-time data on internet-connected devices, we explore ransomware trends across various countries and cities. Through data visualizations and statistical analysis, we aim to identify geographic hotspots of ransomware activity, comprehend infection patterns, and provide valuable insights for cybersecurity professionals. The project underscores the importance of monitoring and comprehending ransomware incidents to enhance global cyber defenses.

1.1 Dependencies

  • R version: R version 4.4.2 (2024-10-31)
  • Required Libraries: dplyr, ggplot2, tidyr, httr2, stringr, ggthemes, renv, plotly, htmltools, maps, knitr, kableExtra, jsonlite, lintr, glue

2 Shodan API Overview

The Shodan API, a powerful tool for searching and retrieving data on internet-connected devices, provides information about devices’ locations, services, vulnerabilities, and more. In this project, the API is used to analyze global trends and patterns of ransomware infections.

3 Data Analysis of Ransomware Infections

This section analyzes ransomware infections. It starts with a summary of affected countries and reported incidents. A statistical analysis presents key metrics on infection distribution. The section concludes with a table detailing ransomware incidents by country and city, revealing geographic trends and high-infection areas.

3.1 Ransomware Infections Summary

According to the Shodan dataset, Brazil is the country with the highest number of ransomware infections, with 11 incidents.

There are a total of 103 ransomware infections worldwide!

3.1.1 Statistical Analysis

  • The average number of ransomware infections per country is 2.86
  • The median number of ransomware infections per country is 1
  • The standard deviation of ransomware infections per country is 2.87

3.2 Table of Ransomware Infections by Country and City

This comprehensive table offers a detailed breakdown of ransomware infection rates across various countries and cities. It presents country and city names alongside the corresponding number of ransomware incidents, making it easy to compare regions. This table serves as a crucial reference point for understanding global ransomware trends and identifying areas where cyber defenses may need reinforcement.

Distribution of Ransomware Infections by Country and City
Country City Number of Infections
807 Germany Frankfurt am Main 5
1719 Russian Federation Moscow 4
1185 Turkey Istanbul 3
2027 Czechia Prague 3
2324 Mexico Santiago de Querétaro 3
2345 Brazil São Paulo 3
211 Spain Barcelona 2
393 Turkey Bursa 2
699 Germany Düsseldorf 2
1553 Brazil Manaus 2
1815 Germany Nürnberg 2
2276 Chile Santiago 2
2385 China Shanghai 2
2421 China Shenzhen 2
2720 Mexico Villahermosa 2
16 Ghana Accra 1
54 Kazakhstan Almaty 1
77 Brazil Aracruz 1
113 Brazil Araranguá 1
162 Kazakhstan Astana 1
225 China Beijing 1
257 Brazil Boa Esperança 1
292 Belarus Brest 1
325 Argentina Buenos Aires 1
409 Egypt Cairo 1
439 Canada Calgary 1
502 United States Cedar Grove 1
513 China Chongqing 1
541 Argentina Comodoro Rivadavia 1
586 Colombia Cúcuta 1
646 United States Des Moines 1
651 Bangladesh Dhaka 1
735 Germany Falkenstein 1
765 China Foshan 1
829 Argentina Godoy Cruz 1
869 Brazil Goiânia 1
901 Argentina Haedo 1
972 Viet Nam Hanoi 1
986 Finland Helsinki 1
1042 United States Herndon 1
1080 Viet Nam Ho Chi Minh City 1
1097 India Hyderābād 1
1138 Pakistan Islamabad 1
1193 Brazil Itajaí 1
1254 South Africa Johannesburg 1
1292 Taiwan Kaohsiung 1
1313 India Kolkata 1
1353 Nigeria Lagos 1
1402 United States Lee’s Summit 1
1428 Peru Lima 1
1466 Portugal Lisbon 1
1507 Spain Madrid 1
1514 Bahrain Manama 1
1594 Colombia Manizales 1
1630 Colombia Medellín 1
1690 United States Mercerville 1
1755 Russian Federation Novyy Urengoy 1
1784 Mexico Nuevo Laredo 1
1856 Mexico Ojuelos de Jalisco 1
1883 Czechia Ostrava 1
1920 Denmark Otterup 1
1967 Panama Panama City 1
2000 Mexico Piedras Negras 1
2072 Mexico Puebla 1
2113 Poland Radom 1
2158 United States Rancho Santa Margarita 1
2182 Pakistan Rawalpindi 1
2201 Brazil Rio de Janeiro 1
2266 United States Santa Fe Springs 1
2477 Singapore Singapore 1
2503 Macedonia, Republic of Skopje 1
2526 Bulgaria Sofia 1
2590 United States Tacoma 1
2627 Uzbekistan Tashkent 1
2659 Spain Tortosa 1
2665 Argentina Villa Sarmiento 1
2767 Spain Villanueva de la Cañada 1
2801 Singapore Woodlands 1
2836 Serbia Zrenjanin 1

4 Data Visualization of Ransomware Infections

This section visualizes ransomware infection patterns globally. It maps incidents at country and city levels using Shodan API data, highlighting affected regions and trends. An interactive map lets users zoom in and examine infection details, making it useful for cybersecurity professionals and researchers.

4.1 Exploring Ransomware Hotspots

This data visualization explores the global distribution of ransomware infections, focusing on the geographical hotspots by country and city. Using data from the Shodan API, the map highlights areas with the highest concentrations of ransomware incidents, shedding light on trends and patterns in cyberattacks. By mapping ransomware infections based on real-time data, the visualization provides insights into which regions are most affected and allows for a better understanding of the geographic spread of these cyber threats. The interactive map enables users to zoom in on specific locations and view detailed information on the number of incidents, cities, and countries impacted, offering valuable insights for cybersecurity professionals and researchers.